package com.itheima.factory;

import com.itheima.service.Imp.UserServiceImpl;
import com.itheima.service.UserService;

public class BeanFactory {
    public static UserService getBean() throws Exception {
       // return new UserServiceImpl();
        UserService obj = (UserService) Class.forName("com.itheima.service.Imp.UserServiceImpl").newInstance();
        return obj;
    }
}
